home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
win
/
ch31
/
31fig09.wrl
< prev
next >
Wrap
Text File
|
1996-09-23
|
1KB
|
53 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright [1997] By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
PROTO SpinGroup [
exposedField MFNode children [ ]
exposedField SFTime cycleInterval 1.0
exposedField SFBool loop FALSE
exposedField SFTime startTime 0.0
exposedField SFTime stopTime 0.0
] {
DEF SpinMe Transform {
children IS children
},
DEF Clock TimeSensor {
cycleInterval IS cycleInterval
loop IS loop
startTime IS startTime
stopTime IS stopTime
},
DEF Spinner OrientationInterpolator {
key [ 0.0, 0.5, 1.0 ]
keyValue [
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 3.14,
0.0 1.0 0.0 6.28
]
},
ROUTE Clock.fraction_changed TO Spinner.set_fraction
ROUTE Spinner.value_changed TO SpinMe.set_rotation
}
SpinGroup {
cycleInterval 4.0
loop TRUE
children [
Shape {
appearance DEF Green Appearance {
material Material { diffuseColor 0.0 1.0 0.3 }
}
geometry Box { size 25.0 2.0 2.0 }
},
Shape {
appearance USE Green
geometry Box { size 2.0 25.0 2.0 }
},
Shape {
appearance USE Green
geometry Box { size 2.0 2.0 25.0 }
}
]
}